Skip to content

Clear GitRoll reliability findings and add type-aware lint - #23

Merged
eduardstan merged 2 commits into
mainfrom
fm/ledgerpress-gitroll
Aug 20, 2026
Merged

Clear GitRoll reliability findings and add type-aware lint#23
eduardstan merged 2 commits into
mainfrom
fm/ledgerpress-gitroll

Conversation

@eduardstan

Copy link
Copy Markdown
Owner

GitRoll reliability findings

I fetched the scanner's client-side issues endpoint (/api/repo-scan/0XzG8rAOs9WUp2BJ5h9t/issues?p=1&ps=100) and read all 42 returned issues. The seven BUGs are:

Severity File:line Exact message Verdict What changed
MAJOR web/src/lib/announcements.ts:553 Group parts of the regex together to make the intended operator precedence explicit. Deliberate idiom Boundary trimming follows normalization, which can emit one edge hyphen. Split the two anchored replacements for clarity; added a -Alpha- regression assertion.
CRITICAL web/src/lib/announcements.ts:558 Provide a compare function to avoid sorting elements alphabetically. Deliberate idiom Kind names intentionally use reproducible UTF-16/code-unit order because this order allocates collision suffixes and therefore stable filter slugs. Added an explicit comparator and mixed-case coverage.
CRITICAL web/src/lib/record.ts:111 Provide a compare function that depends on String.localeCompare, to reliably sort elements alphabetically. Deliberate idiom Source paths must be reproducible regardless of filesystem enumeration or process locale. Added the same explicit code-unit comparator and a temporary Zulu.md/alpha.md reader test.
MAJOR web/src/styles/global.css:6 Unexpected unknown at-rule @custom-variant Scanner artefact This is the valid Tailwind CSS v4 directive consumed by the Tailwind Vite plugin, not browser CSS. Kept it and added a one-line NOSONAR rationale.
MAJOR web/src/styles/global.css:1165 Unexpected unknown pseudo-element selector ::details-content Scanner artefact Valid modern <details> animation enhancement used by the publication rows; native details behavior remains the fallback. Added a one-line NOSONAR rationale.
MAJOR web/src/styles/global.css:1175 Unexpected unknown pseudo-element selector ::details-content Scanner artefact Same deliberate progressive enhancement; retained with reasoned NOSONAR.
MAJOR web/src/styles/global.css:1181 Unexpected unknown pseudo-element selector ::details-content Scanner artefact Same deliberate reduced-motion rule; retained with reasoned NOSONAR.

All seven are cleared in the source: no finding was left unresolved. The three duplicate CSS selector smells were also consolidated while touching that stylesheet.

Finding inventory

Location split:

  • Bugs: web/ 7, scripts/ 0, content//cv//other 0.
  • Smells: web/ 24, scripts/ 11, content//cv//other 0.

Message-grouped smell breakdown (35 total):

  • “Refactor this code to not use nested template literals.” — 7: scripts/build-cv-data.mjs (341, 344, 345), scripts/check-deployment-base.mjs:63, web/src/lib/announcements.ts (280, 349, 626).
  • “Refactor this function to reduce its Cognitive Complexity …” — 7: scripts/build-cv-data.mjs (385, 554), web/src/lib/announcements.ts:351, web/src/lib/consistency.ts:363, web/src/lib/cv-schema.ts:479, web/src/lib/record.ts (319, 528).
  • “Extract this nested ternary operation into an independent statement.” — 8: scripts/build-cv-data.mjs:398, scripts/import-orcid.mjs:85, scripts/read-cv-owner.mjs:16, web/src/lib/cv-schema.ts (268, 270, 272), web/src/lib/record.ts (415, 431).
  • “Extract the assignment of match from this expression.” — 1: scripts/build-cv-data.mjs:390.
  • “This loop's stop condition tests match, directive, source but the incrementer updates directive.lastIndex.” — 1: scripts/build-cv-data.mjs:390.
  • “This assertion is unnecessary …” — 3: web/src/lib/consistency.ts:412, web/src/lib/urls.ts:45, web/src/pages/rss.xml.ts:28.
  • “Remove this assignment of cursor.” — 1: web/src/lib/record.ts:345.
  • “Remove duplicates in this character class.” — 4: web/src/lib/record.ts (719 twice, 728 twice).
  • “Unexpected duplicate selector …” — 3: web/src/styles/global.css (103, 865, 1478).

Type-aware lint

Added explicit root dev dependencies (eslint 9.39.5 and typescript-eslint 8.46.0), a flat config using web/tsconfig.json in project/type-aware mode, and the two focused rules used by the reference implementation. The lint workflow installs both npm lockfiles and runs beside the existing checks. No formatter was added.

Cold-install evidence (actual output):

$ npm ci
added 127 packages, and audited 128 packages in 7s
found 0 vulnerabilities
$ npm ci --prefix web
added 425 packages, and audited 426 packages in 6s
3 high severity vulnerabilities
$ npm run lint
> ledgerpress@1.0.0 lint
> eslint web

The web audit warning is from the existing web dependency tree; lint exits 0 and the GitRoll scan reported Security A / 0 vulnerabilities.

Validation

$ npm run check
Regenerating cv/generated/cv-data.tex from content/cv.yaml — this check writes that tracked file.
wrote cv/generated/cv-data.tex
cv/generated/cv-data.tex is up to date with content/cv.yaml.
Result (42 files):
- 0 errors
- 0 warnings
- 0 hints
ok — project-subpath routes and assets share one deployment base
Cold-start adopter check: replace content only, then build both outputs.
Materialized 106 tracked paths; ignored and untracked build outputs were not copied.
ok — project-subpath routes and assets share one deployment base
All matched files use Prettier code style!

$ npm test
45 tests passed; cv/generated/cv-data.tex is up to date with content/cv.yaml.

$ npm run lint
eslint web — passed

The generated CV file's hash was unchanged because content/ was not changed.

@eduardstan
eduardstan merged commit f9854f4 into main Aug 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant